from typing import List


def house_robber(houses: List[int])->int:
    dp = [0]*(len(houses)+2)
    for i in range(len(houses)):
        money = houses[i]
        dp[i+2] = max(money + dp[i], dp[i+1])
    return dp[-1]

print(house_robber([2,7,9,3,1]))